<?php
class memberController extends accessController{
    private $svc=null;
    
    public function __construct(){
        parent::__construct();
        $this->svc=load_service('member');
    }
    public function mod(){
        $id=intval($_GET['id']);
        $data=$this->svc->mod($_GET['id']);
        if($data){
            include($this->viewer_dir.'member/mod.php');
        }
    }
    public function mod_(){
        $id=intval($_GET['id']);
        $r=$this->svc->mod_($_POST,$id);
        if($r[0]){
            alert('会员编辑成功！');
            reload();
        }else{
            alert('会员编辑失败！'.$r[1]);
            back();
        }
    }
    public function li(){
        $return=$this->svc->li();
        include($this->viewer_dir.'member/list.php');
    }
}